package bookmanage.Opreation;

import bookmanage.Book;
import bookmanage.BookDao;

import java.util.List;

//查看书籍列表
public class DisplayOperation implements IOperation {
    @Override
    public void work() {
        System.out.println("显示所有书籍：");
        BookDao bookDao = new BookDao();
        List<Book> books = bookDao.selectAll();
        for (Book book:books){
            System.out.println(book);
        }
        System.out.println("所有书籍显示完毕！");
    }
}
